import 'package:boss/ui/widget/radioList/radio_list_picker.dart';
import 'package:flutter/cupertino.dart';

import 'model/radio_item_data.dart';

class RadioListPickerUtil {
  static Future<List<String>> authorityManagement(BuildContext context, {List<String> value}) {
    return showRadioListPicker(
      context,
      title: '权限管理',
      value: value ?? [],
      items: [
        RadioItemData(title: '店长', value: '店长'),
        RadioItemData(title: '收银员', value: '收银员'),
        RadioItemData(title: '服务员', value: '服务员'),
        RadioItemData(title: '合伙人', value: '合伙人'),
      ],
    );
  }

  static Future<List<int>> weekday(BuildContext context, {List<int> value, bool isMultiple = true}) {
    return showRadioListPicker<int>(
      context,
      title: '选择星期',
      items: [
        RadioItemData(title: '星期一', value: 0),
        RadioItemData(title: '星期二', value: 1),
        RadioItemData(title: '星期三', value: 2),
        RadioItemData(title: '星期四', value: 3),
        RadioItemData(title: '星期五', value: 4),
        RadioItemData(title: '星期六', value: 5),
        RadioItemData(title: '星期日', value: 6),
      ],
      value: value,
      isMultiple: isMultiple,
    );
  }
}
